<Project Sdk="Microsoft.NET.Sdk">
  <Import Project="..\DefaultBrowserSample.targets" />
  <PropertyGroup>
    <EnableAggressiveTrimming>true</EnableAggressiveTrimming>
    <PublishTrimmed>true</PublishTrimmed>
    <InvariantTimezone>true</InvariantTimezone>
    <WasmEnableWebcil>false</WasmEnableWebcil>
    <WasmEmitSymbolMap>true</WasmEmitSymbolMap>
    <EmccEnableAssertions>true</EmccEnableAssertions>
    <EmccEnvironment>web,worker</EmccEnvironment>
    <!-- add OpenGL emulation -->
    <EmccExtraLDFlags> -s USE_CLOSURE_COMPILER=1 -s LEGACY_GL_EMULATION=1 -lGL -lSDL -lidbfs.js</EmccExtraLDFlags>
    <!-- just to prove we don't do JS eval() -->
    <_ServeHeaders>$(_ServeHeaders) -h &quot;Content-Security-Policy: default-src 'self' 'wasm-unsafe-eval'&quot;</_ServeHeaders>
    <!-- enable reporting to profiler in browser dev tools -->
    <WasmProfilers>browser;</WasmProfilers>

    <!-- Put "framework" (dotnet.js, dlls, etc) files directly into the AppBundle -->
    <WasmRuntimeAssetsLocation>./</WasmRuntimeAssetsLocation>
  </PropertyGroup>
  <ItemGroup>
    <WasmExtraFilesToDeploy Include="main.js" />
    <WasmExtraFilesToDeploy Include="advanced-sample.lib.module.js" />
    <!-- add export GL object from Module -->
    <EmccExportedRuntimeMethod Include="GL" />
    <NativeFileReference Include="fibonacci.c" />
    <TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml" />
  </ItemGroup>

  <Target Name="RunSample" DependsOnTargets="RunSampleWithBrowserAndSimpleServer" />

</Project>
